package org.han.jdk.proxy.dy2;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * @author hanjuntao
 * @date 2025/4/25 0025
 */
public class ProxyHandler implements InvocationHandler {

    private Class<?> clazz;

    public ProxyHandler(Class<?> clazz) {
        this.clazz = clazz;
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        System.out.println("日志开始");

        System.out.println("执行代理方法参数:" + args);
        System.out.println("执行代理方法:" + method.getName());
        System.out.println("日志结束");
        return "ssss";
    }
}